<template lang="pug">
	.order-detail-wrap
		.detail-block
			.detail-head
				.doctor-head
					img(src="../../assets/image/order/doctorHead.png")
				.doctor-info
					.doctor-name
						div(v-if="item.doctor_name") {{item.doctor_name}}
						small(v-if="item.doctor_title") {{item.doctor_title}}
					small(v-if="item.department_name") {{item.department_name}}
				.state(:class="{'active':item.res_type === '5'}") {{item.stateText}}
			.detail-item
				p 就诊时间
				.item-right
					.date {{item.schedule_date}} {{item.week}} {{item.outTimeText}}
					.time {{item.time}} 第{{item.reg_num}}号
		.detail-block
			.detail-item
				p 就诊人
				.item-right {{item.patient_name}}
			.detail-item
				p 就诊卡号
				.item-right {{item.card_number?item.card_number:"无卡预约"}}
			.detail-item
				p 取号码
				.item-right {{item.qhyzm?item.qhyzm:''}}
			.detail-item
				p 支付状态
				.item-right(:class="{'active':item.pay_status==='0'}") {{item.payResult}}
		.detail-block.fees-group
			.detail-item.fees-title
				p 就诊费用
				.item-right {{item.totalPrice}}元
			.fees-detail
				.detail-item
					p 挂号费
					.item-right {{item.regFee}}元
				.detail-item
					p 诊疗费
					.item-right {{item.clinicFee}}元
				.detail-item
					p 订单号
					.item-right {{item.pay_num}}


</template>

<script>
export default {
	name: 'orderDetail',
	data() {
		return {
			item: {}
		}
	},
	created() {},
	mounted() {
		let that = this
		this.wx.getStorage({
			key: 'myOrderDetail',
			success(res) {
				let data = res.data
				data.time = data.yysjd.split(' ')[1]
				data.pay_status === '1' && (data.payResult = '已支付')
				data.pay_status === '0' && (data.payResult = '未支付')
				data.pay_status === '2' && (data.payResult = '支付确认中')
				data.regFee = that.filter.formatIncome(data.reg_fee)
				data.clinicFee = that.filter.formatIncome(data.clinic_fee)
				that.item = data
			}
		})
	},
	methods: {}
}
</script>

<style lang="stylus">
	.order-detail-wrap
		.detail-block
			margin-top mainMargin
			background-color white
			padding mainPadding
			.detail-head
				display flex
				align-items center
				padding 0 0 mainPadding
				border-bottom borderStyle
				margin-bottom 30px
				.doctor-head
					width 110px
					height 110px
					border-radius 50%
					overflow hidden
					img
						width 100%
						height 100%
				.doctor-info
					flex 1
					margin 0 0 0 25px
					.doctor-name
						display flex
						align-items center
						div
							font-size 30px
							font-weight 500
							color blackFontColor1A
							line-height 44px
							margin-right 10px
					small
						font-size 24px
						color #aaa
						line-height 34px
				.state
					font-size 30px
					font-weight 500
					color #FF4B4B
					line-height 44px
					&.active
						color themeColor
			.detail-item
				display flex
				justify-content space-between
				font-size 30px
				line-height 48px
				margin-bottom 18px
				p
					color grayFontColor88
					flex 1
				.item-right
					color blackFontColor1A
					text-align right
					&.active
						color #C69463
				&:last-child
					margin-bottom 0
		.fees-group
			padding 0 mainPadding
			.fees-title
				line-height 100px
				border-bottom borderStyle
				margin-bottom 0
			.fees-detail
				padding mainPadding 0
				.detail-item
					font-size 24px
					line-height 34px
					margin-bottom 13px
					.item-right
						color #aaa
</style>
